<script type="text/ng-template" id="winitMenuPagePop.html">
<div class="modal-header">
    <h3 class="modal-title">新增</h3>
</div>
<form name="form" class="modal-body form-horizontal form-validation">
    <div class="form-group">
        <label class="col-sm-2 control-label">ID</label>
        <div class="col-sm-10">
            <label class="col-sm-2 control-label">{{menuTree.id}}</label>
        </div>
    </div>
    <div class="line-lg pull-in" style="margin-top: 8px;margin-bottom: 8px;"></div>
    <div class="form-group">
        <label class="col-sm-2 control-label">标题<span style="color:red;">*</span></label>
        <div class="col-sm-10">
            <input type="text" class="form-control" placeholder="请输入标题 (中英文数字不带空格,最大长度30)" ng-model="menuTree.menu_data.name" ng-maxlength="15" ng-pattern="/^[\u4e00-\u9fa5a-zA-Z0-9_]{1,30}$/" required >
        </div>
    </div>
    <div class="line-lg pull-in" style="margin-top: 8px;margin-bottom: 8px;"></div>
    <div class="form-group">
        <label class="col-sm-2 control-label">路径<span style="color:red;">*</span></label>
        <div class="col-sm-10">
            <input type="text" class="form-control" placeholder="请输入路径（英文, 长度15以内，同级不能重复）" ng-model="menuTree.menu_data.path" ng-maxlength="15"  ng-pattern="/^[a-zA-Z0-9_]{1,15}$/" ng-blur="verfPath()" required >
        </div>
    </div>
    <div class="line-lg pull-in" style="margin-top: 8px;margin-bottom: 8px;"></div>
    <div class="form-group">
        <label class="col-sm-2 control-label">图标</label>
        <div class="col-sm-10">
            <select class="form-control" ng-model="menuTree.menu_data.icon" aria-required="true">
                <option value="1">winit-gattbase</option>
            </select>
        </div>
    </div>
    <div class="line-lg pull-in" style="margin-top: 8px;margin-bottom: 8px;"></div>
    <div class="form-group">
        <label class="col-sm-2 control-label">visible</label>
        <div class="col-sm-10">
            <m-switch true-value="'true'" false-value="'false'" status="menuTree.menu_data.visible"></m-switch>
        </div>
    </div>
    <div class="line-lg pull-in" style="margin-top: 8px;margin-bottom: 8px;"></div>
    <div class="form-group">
        <label class="col-sm-2 control-label">routeId</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" placeholder="请输入routeId（只能由英文和斜杠组成，且最大长度为40！）" ng-model="menuTree.menu_data.routeId" ng-pattern="/^[a-zA-Z_/-]{1,40}$/" required >
        </div>
    </div>
    <div class="line-lg pull-in" style="margin-top: 8px;margin-bottom: 8px;"></div>
    <div class="form-group">
        <label class="col-sm-2 control-label">rightId</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" placeholder="请输入rightId（只能由英文和斜杠组成，且最大长度为30！）" ng-model="menuTree.menu_data.rightId" ng-pattern="/^[a-zA-Z/_]{1,30}$/" required >
        </div>
    </div>
</form>
<div class="modal-footer">
    <button type="submit" class="btn btn-primary" ng-click="createClick()" ng-disabled="form.$invalid">保存</button>
    <button type="button" class="btn btn-default" ng-click="cancelClick()">取消</button>
</div>
</script>